package com.example.demo.spring.reflect;

/**
 * @program: demo
 * @description: 被反射类
 * @author: yby
 * @create: 2020-06-28 15:37
 **/
public class Book {

        private final static String TAG = "BookTag";

        private String name;
        private String author;

        public void say(String[] param){
            System.out.println("我是say方法："+param);
        }

        @Override
        public String toString() {
            return "Book{" +
                    "name='" + name + '\'' +
                    ", author='" + author + '\'' +
                    '}';
        }

        public Book() {
        }

        private Book(String name, String author) {
            this.name = name;
            this.author = author;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getAuthor() {
            return author;
        }

        public void setAuthor(String author) {
            this.author = author;
        }

        private String declaredMethod(int index) {
            String string = null;
            switch (index) {
                case 0:
                    string = "I am declaredMethod 1 !";
                    break;
                case 1:
                    string = "I am declaredMethod 2 !";
                    break;
                default:
                    string = "I am declaredMethod 1 !";
            }

            return string;
        }
}
